﻿using System;

namespace DrillingTrack3D.Model
{
    public class XYZModel
    {
        public string Id;                               //钻孔编号
        public string Date;                           //数据采集时间
        public float Depth;                            //孔深
        public float Azimuth;                          //方位角
        public float Inclination;                      //倾角
        public float Rotation;                         //翻滚角度

        public float X;
        public float Y;
        public float Z;
        public float HolderPressure;
        public float ChuckPressure;
        public float SensorData;
        public string GroupNum;

        public XYZModel(string id, string date, string depth, string azimuth, string inclination, string rotation, string x, string y, string z)
        {
            Id = id;
            Date = date;

            float.TryParse(depth, out Depth);
            float.TryParse(azimuth, out Azimuth);
            float.TryParse(inclination, out Inclination);
            float.TryParse(rotation, out Rotation);

            float.TryParse(x, out X);
            float.TryParse(y, out Y);
            float.TryParse(z, out Z);
        }

        public XYZModel(string id, string date, string depth, string groupNum, string holderPressure, string chuckPressure, string sensorData)
        {
            Id = id;
            Date = date;
            float.TryParse(depth, out Depth);
            GroupNum = groupNum;

            float.TryParse(holderPressure, out HolderPressure);
            float.TryParse(chuckPressure, out ChuckPressure);
            float.TryParse(sensorData, out SensorData);
        }

    }
}